package com.easyweb.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Version;

import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

@Entity
@NamedQueries( {					
	@NamedQuery(name = "liseBolumleriTumKayitlar", query = "select l from LiseBolumleri l order by l.name")
})
 
@Table
 
public class LiseBolumleri implements Serializable
{
   
    private Long id;
    private Integer version;
    private String name;
  
    @Id @GeneratedValue
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Version
    public Integer getVersion() {
        return version;
    }

    private void setVersion(Integer version) {
        this.version = version;
    }

    @NotNull(message="#{messages.errBosOlamaz}")
    @Length(max = 100,message="#{messages.errUzunlukYuzGecemez}")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
